package com.easy.slurm.slurm.config;

import com.jcraft.jsch.JSchException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author bing.bai
 * @create 2025/6/9
 */
@Component
public class SlurmConfig {

    @Value("${slurm.work-dir}")
    private String workDir;

    @PostConstruct
    public void init() throws JSchException {
        if (StringUtils.isNotBlank(workDir)) {
            SlurmConstants.WORKDIR = workDir;
        }
    }

}
